-- Random map (map1) script file

-- register the map we just created
--			tile to insert, map width, map height
do
local water = GetImageID("water")
local snow = GetImageID("snow")
local ice = GetImageID("ice")
local dirt = GetImageID("dirt")
local grass = GetImageID("grass")
rooms = {}

local mapW , mapH = 100, 100
RegisterMap(CreateMap(water, mapW, mapH))

rooms.tl = 	AddRoom(0,0,	25,25,		0,0,	 25,25, 	.6, grass, "SNAKE_FULL")
rooms.tr = 	MirrorRoom(rooms.tl, false, true) -- the 1's signify mirror x axis and y axis, <= 0 tells it "don't mirror"
rooms.br = 	MirrorRoom(rooms.tl, true, true)
rooms.bl = 	MirrorRoom(rooms.tl, true, false)

width = 3 -- width of the path
scatter = 1 -- positive imples to use a more "random" path; it will later affect how much "random" to have
rooms.a = 	AddPath(rooms.tl, rooms.tr, width, ice, 5)
--rooms.b = 	MirrorRoom(rooms.a, false, true) 
--rooms.c = 	MirrorRoom(rooms.a, true, true)
--rooms.d = 	MirrorRoom(rooms.a, true, false)
rooms.b = AddPath(rooms.tl, rooms.bl, width, ice, .5)
rooms.c = AddPath(rooms.bl, rooms.br, width, ice, 25)
rooms.d = AddPath(rooms.br, rooms.tr, width, ice, -1)

--rooms.center = 	AddRoom(28,28,	58,58,	28,28,	58,58,		.5,		dirt, 	"BOX")
--rooms.e = AddPath(rooms.center, rooms.d, 3, grass, scatter, true)

-- save the map we just created
SaveMap("Maps\\map2.map")
end 
